<template>
	<view class="lead-page-main-box" @tap="changes">
		<image class="bg-image" mode="widthFix" src="https://h5.sx2b2c.com/images/common/leadPage/bg.png"></image>
		<view class="lead-page-box">
			<image class="lead-icon" mode="heightFix" src="https://h5.sx2b2c.com/images/common/leadPage/lead-icon.png">
			</image>
			<image class="lead-btn" mode="widthFix" src="https://h5.sx2b2c.com/images/common/leadPage/lead-btn.png">
			</image>
		</view>

	</view>
</template>

<script setup>
	 export default {
			data() {
				return {
	
					mobile: "",
					a:"",
					param:"",
					nomobile:"",
					orderNo:'',//订单号
					deviceid:''
	
				};
			},
			methods:{
				changes(){
				
					
					let system = navigator.userAgent.toLowerCase();
					//判断打开环境
					if (/MicroMessenger/.test(window.navigator.userAgent)) {
						
					} else if (/AlipayClient/.test(window.navigator.userAgent)) {
						
					} else {
					
					window.location.href=`https://ulink.alipay.com/?scheme=` +
						encodeURIComponent(`alipays://platformapi/startapp?appId=2021004129621025&page=pages/etcs/etcs&query=${encodeURIComponent('mobile='+this.mobile+'&a='+this.a+'&param='+this.param+'&orderNo='+this.orderNo+'&deviceid='+this.deviceid  )}`
						)
					}
				}
			},
			
			onLoad(option) {
				console.log(uni.getStorageSync('a'))
				if(option.mobile){
					this.mobile = option.mobile
				}
				if(option.a){
					this.a= option.a
				}
				if(option.param){
					this.param=option.param
				}
				if(option.orderNo){
					this.orderNo=option.orderNo
				}
				if(option.deviceid){
					this.deviceid=option.deviceid
				}
				
				
				let system = navigator.userAgent.toLowerCase();
				//判断打开环境
				if (/MicroMessenger/.test(window.navigator.userAgent)) {
	
				} else if (/AlipayClient/.test(window.navigator.userAgent)) {
	 
				} else {
						
				window.location.href=`https://ulink.alipay.com/?scheme=` +
				encodeURIComponent(`alipays://platformapi/startapp?appId=2021004129621025&page=pages/etcs/etcs&query=${encodeURIComponent('mobile='+this.mobile+'&a='+this.a+'&param='+this.param+'&orderNo='+this.orderNo+'&deviceid='+this.deviceid  )}`
	)
				}
	
			}
		}
		
</script>

<style lang="scss" scoped>
	@keyframes butChange {
		0% {
			transform: scale(1);
		}
	
		50% {
			transform: scale(1.1);
		}
	
		100% {
			transform: scale(1);
		}
	}
.lead-page-main-box {
		background-color: #fff;
		position: fixed;
		width: 100vw;
		min-height: 100vh;
		left: 0;
		top: 0;
		z-index: 9;
		display: flex;
		justify-content: center;
		align-items: center;

		.bg-image {
			display: block;
			width: 90%;
			margin-top: -300rpx;
		}

		.lead-page-box {
			position: absolute;
			left: 0;
			top: 0;
			width: 100%;
			min-height: 100vh;
			background: url('https://h5.sx2b2c.com/images/common/leadPage/shadown.png');

			.lead-icon {
				width: auto;
				height: 500rpx;
				display: block;
				position: absolute;
				top: 30rpx;
				right: 30rpx;
			}

			.lead-btn {
				position: absolute;
				width: 80%;
				height: auto;
				display: block;
				left: 10%;
				top: 78vw;
				animation: butChange 2s infinite;

			}

		}
	}
</style>